package day14;

import ZUOYE2.E;

import java.io.*;
import java.util.ArrayList;
import java.util.List;

public class learn2 {
    public static void main(String[] args) throws IOException {
        //创建输入流对象
        FileInputStream inputStream=new FileInputStream("D:\\WUDownloadCache\\微信图片_20220214224306.jpg");

        DataInputStream dataInputStream=new DataInputStream(inputStream);
        //创建输出流对象
        FileOutputStream fileOutputStream=new FileOutputStream("C:\\Intel\\微信图片_20220214224306.jpg");
        DataOutputStream dataOutputStream=new DataOutputStream(fileOutputStream);
        int t=-1;
        //调用DataInputStream对象read方法读数据
        while((t=dataInputStream.read())!=-1){
            //强转
            char ch=(char)t;
            dataOutputStream.flush();
            //调用DataOutputStream对象write方法写数据
            dataOutputStream.write(t);
        }
    }
}
